package demo5;
class Point{	
	double x,y,z;
	Point(double x,double y,double z){
		this.x=x;
		this.y=y;
		this.z=z;
	}
	public double getDistance( Point point1) {	
		return Math.sqrt(((this.x-point1.x)*(this.x-point1.x)
				+(this.y-point1.y)*(this.y-point1.y))
				+(this.z-point1.z)*(this.z-point1.z));
	}
}
public class Distance {
	public static void main(String[] args) {
		Point point1=new Point(1.0,1.0,1.0);
		Point point2=new Point(2.0,2.0,2.0);
		System.out.println(point2.getDistance(point1));
	}
}